Ccay.Module.define("Ccay.example.mail",function(page,$S){
	page.ready=function(){
		$S("input[name='mailTo']").val(workspaceVO.user.email);
		$S("#mailTab").ccayTab();
	}
	
	page.gotoDemo=function(){
		$("#mailTab").getCcayTabManager().selectItem('mail');
	};
	
	//查找路径
	page.sendMail=function(){
		 Ccay.doPost("services/ccay/demo/mail/single",$S("#bizForm1").jsonData());
	}
	
	//查找路径
	page.sendMeetingMail=function(){
		if(document.getElementById("startDate").value==""){
			return;
		}
		if(document.getElementById("endDate").value==""){
			return;
		}
		if(document.getElementById("subject").value!=""){
			Ccay.doPost("services/ccay/demo/mail/singleMeeting",$S("#meetingForm").jsonData());
		}
	}
});